/* Header file alg_md.h */

#ifndef ALG_MD_HEADER
#define ALG_MD_HEADER

namespace model
{

static double loglikelihood_exp(double *clkarray, unsigned int clk_size, double lambda);
static double loglikelihood_wei(double *clkarray, unsigned int clk_size, double gamma, double k);
static double loglikelihood_logn(double *clkarray, unsigned int clk_size, double mu, double sigma);

static void inf_exp(double *clkarray, unsigned int clk_size, double alpha, double *lambda);
static void inf_wei(double *clkarray, unsigned int clk_size, double alpha, double *gamma, double *k);
static void inf_logn(double *clkarray, unsigned int clk_size, double alpha, double *mu, double *sigma);

static void chi2_exp(clock_l *clkList, double alpha, double lambda, double *h, double *p);
static void chi2_wei(clock_l *clkList, double alpha, double gamma, double k, double *h, double *p);

static unsigned int max_el(double *loglk);

void selection(psa *trie);

}

#endif
